<?php
/**
 * IWpSession.php
 * 
 * This file contains the interface IWpSession to be used for all session implementations
 * @author Robert Schmidt <robert@wildpack.de>
 * @version 1.0
 * @package wildpack
 * @subpackage web
 */


/**
 * IWpSession
 * 
 * The interface to be used for all session implementations
 * @author Robert Schmidt <robert@wildpack.de>
 * @version 1.0
 * @package wildpack
 * @subpackage web
 */
interface IWpSession
{	
	/**
	 * Starts a new session or loads a session specified by id
	 * @param string $id [optional] The session id. To set the timeout 
	 * parameter without specifying an id, provide an empty string
	 * @param int $timeout [optional] The session timeout in seconds (default is 300)  
	 */
	function startSession($id = '', $timeout = 300);
	
	/**
	 * Closes a session and throws all session variables away
	 * @param string $id [optional] The if of the session
	 */
	function endSession($id = '');
	
	/**
	 * Sets a session variable
	 * @param string $name The name of the session variable to set
	 * @param mixed $value The value to set the session variable to
	 * @return True if successfully set false else (if no session is started, it returns false) 
	 */
	function set($name, $value);
	
	/**
	 * Retrieves the value of a session variable
	 * @param string $name The name of the variable to return
	 * @return mixed The variables value
	 */
	function get($name);
}

/* End of file IWpSession.php */
/* Location: ./wildpack/web/IWpSession.php */ 